package com.wx;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

/**
 * 消费者
 *  todo http://localhost:8088/send?text=welcomewx
 * result:接收到消息：welcomewx
 */
@Component
public class Consumer {

    @JmsListener(destination = "SpringBoot-wx-in")
    public void readMessage(String text){
        System.out.println("接收到消息："+text);
    }


    @JmsListener(destination = "map")
    public void readMap(Map map){
        System.out.println("接收到map"+map);
    }


}
